package com.fs.controller;

import com.fs.pojo.GoodsImages;
import com.fs.vo.PageResult;
import com.fs.vo.SysResult;
import com.fs.service.GoodsImagesSerivce;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "商品图片管理-废弃")
@RestController
@RequestMapping("/goodsImages")
public class GoodsImagesController {
    @Autowired
    private GoodsImagesSerivce goodsImagesSerivce;

    @PostMapping("/add")
    public SysResult add(@RequestBody GoodsImages entity){
        return goodsImagesSerivce.add(entity);
    }

    @PutMapping("/edit")
    public SysResult edit(@RequestBody GoodsImages entity){
        return goodsImagesSerivce.edit(entity);
    }

    @GetMapping("/list")
    public SysResult list(PageResult request){
        return goodsImagesSerivce.list(request);
    }

    @DeleteMapping("/{id}")
    public SysResult deleteById(@PathVariable("id") Integer id){
        return goodsImagesSerivce.delById(id);
    }
}
